﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DSS_XNA.DeveloperWindow
{
    public partial class frmDeveloperWindow : Form
    {
        public Game1 Engine
        {
            get { return _engine; }
            set { _engine = value; }
        }
        private Game1 _engine = null;

        public frmDeveloperWindow(Game1 engine)
        {
            InitializeComponent();

            this._engine = engine;
        }

        public void SetDeveloperInfo(string info)
        {
            this.textDeveloperInfo.Text = info;
        }

        private void buttonAction_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(this.textCommand.Text))
                return;

            // is this a developer window command?
            // TBI...

            // must be an in game script command
            Game1.ScriptManager.RunCommandRequest(this.textCommand.Text);

            this.textDisplay.Text = String.Format("{0}\n{1}", this.textDisplay.Text, this.textCommand.Text);
        }

        private void frmDeveloperWindow_Load(object sender, EventArgs e)
        {

        }
    }
}
